home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Updates / Librarys / MMULib / Include / mmu / mmutags.i < prev   
Text File  |  1999-10-30  |  7KB  |  181 lines

  1.         IFND MMU_MMUTAGS_I
  2. MMU_MMUTAGS_I   SET     1
  3. ;*************************************************************************
  4. ;** mmu.library                                                         **
  5. ;**                                                                     **
  6. ;** a system library for arbitration and control of the MC68K MMUs      **
  7. ;**                                                                     **
  8. ;** © 1999 THOR-Software, Thomas Richter                                **
  9. ;** No commercial use, reassembly, modification without prior, written  **
  10. ;** permission of the authors.                                          **
  11. ;** Including this library in any commercial software REQUIRES a        **
  12. ;** written permission and the payment of a small fee.                  **
  13. ;**                                                                     **
  14. ;**---------------------------------------------------------------------**
  15. ;** Definition of tags for the MMU library                              **
  16. ;**                                    **
  17. ;** $VER: 40.50 (31.10.99)                        **
  18. ;*************************************************************************
  19.  
  20.         IFND EXEC_TYPES_I
  21.         INCLUDE "exec/types.i"
  22.         ENDC ; EXEC_TYPES_I
  23.  
  24.         IFND UTILITY_TAGITEM_I
  25.         INCLUDE "utility/tagitem.i"
  26.         ENDC ; UTILITY_TAGITEM_I
  27.  
  28.  
  29. MAPTAG_DUMMY            equ     (TAG_USER+$03e00000)
  30.  
  31. ;* SetProperties and SetPageProperties tags *
  32.  
  33. MAPTAG_DESTINATION      equ     (MAPTAG_DUMMY+1)
  34. ;* destination in case the memory gets remapped *
  35.  
  36. MAPTAG_BLOCKID          equ     (MAPTAG_DUMMY+2)
  37. ;* a unique block ID for swapped out pages. MUST be given. *
  38.  
  39. MAPTAG_USERDATA         equ     (MAPTAG_DUMMY+3)
  40. ;* user data for invalid, non-repairable pages. Optional. *
  41.  
  42. MAPTAG_DESCRIPTOR       equ     (MAPTAG_DUMMY+4)
  43. ;* the real descriptor for indirect pages. *
  44.  
  45.  
  46. ;* CreateMMUContext tags *
  47.  
  48. MCXTAG_DUMMY            equ     (TAG_USER+$03e00100)
  49.  
  50. MCXTAG_COPY             equ     (MCXTAG_DUMMY+$001)
  51. ;* copy the definition from another context, given as tag argument *
  52.  
  53. MCXTAG_EXECBASE         equ     (MCXTAG_DUMMY+$010)
  54. ;* disable the special AbsExecBase and low-memory handling ? *
  55.  
  56. MCXTAG_BLANKFILL        equ     (MCXTAG_DUMMY+$011)
  57. ;* a LONG value to fill "blank" memory with *
  58.  
  59. MCXTAG_MEMORYATTRS      equ     (MCXTAG_DUMMY+$012)
  60. ;* the memory attributes to allocate the MMU tables from,
  61. ;* defaults to MEMF_PUBLIC *
  62.  
  63.  
  64. MCXTAG_PRIVATESUPER     equ     (MCXTAG_DUMMY+$013)
  65. ;* Create a private supervisor MMU table as well?
  66. ;* This defaults to FALSE, but even if the argument is
  67. ;* set to FALSE explicitly, the library might ignore your
  68. ;* choice and build a supervisor table if your table layout
  69. ;* is incompatible to the default supervior table.
  70.  
  71. MCXTAG_ZEROBASE         equ     (MCXTAG_DUMMY+$014)
  72. ;* If the zeropage is invalidated, read the data from where?
  73. ;* This must be set explicitly if the zero page gets remapped,
  74. ;* unfortunately. Might be fixed in a future release. *
  75.  
  76. MCXTAG_DISCACHEDES    equ     (MCXTAG_DUMMY+$15)
  77. ;* Mark the memory allocated allocated for the descriptors of THIS
  78. ;* context as cacheinhibit.
  79. ;* Defaults to FALSE.
  80. ;* 
  81.  
  82.  
  83. MCXTAG_DEPTH            equ     (MCXTAG_DUMMY+$020)
  84. ;* define the depth of the MMU tree to build. Defaults to the
  85. ;* depth of the default tree, which is *usually* three.
  86. ;* Ranges from 1 to 4 *
  87.  
  88. MCXTAG_LEVELABITS       equ     (MCXTAG_DUMMY+$021)
  89. ;* number of bits to reserve for the top level of the tree *
  90.  
  91. MCXTAG_LEVELBBITS       equ     (MCXTAG_DUMMY+$022)
  92. ;* number of bits for the level B of the tree, if the depth is >1 *
  93.  
  94. MCXTAG_LEVELCBITS       equ     (MCXTAG_DUMMY+$023)
  95. ;* number of bits for the level C of the tree, if the depth is >2 *
  96.  
  97. MCXTAG_LEVELDBITS       equ     (MCXTAG_DUMMY+$024)
  98. ;* bits for the level D of the tree, if the depth is 4 *
  99.  
  100. MCXTAG_PAGEBITS         equ     (MCXTAG_DUMMY+$025)
  101. ;* the number of bits used for the page, 2^bits is the page size *
  102.  
  103. MCXTAG_ERRORCODE        equ     (MCXTAG_DUMMY+$030)
  104. ;* a pointer to a ULONG, to fill in an error code from CreateContext *
  105.  
  106.  
  107.  
  108.  
  109. ;* AddContextHook tags *
  110.  
  111. MADTAG_DUMMY            equ     (TAG_USER+$03e00200)
  112.  
  113. MADTAG_CONTEXT          equ     (MADTAG_DUMMY+0)
  114. ;* the context to which the context hook should be added. *
  115.  
  116. MADTAG_TASK             equ     (MADTAG_DUMMY+1)
  117. ;* if the exception is task specific, then this is the task pointer.
  118. ;* Note that many task specific handlers slow down exception handling. *
  119.  
  120. MADTAG_TYPE             equ     (MADTAG_DUMMY+2)
  121. ;* type of the exception, MMUEH_SEGFAULT, MMUEH_SWAPPED, MMUEH_SWITCH or
  122. ;* MMUEH_LAUNCH. See exceptions.h *
  123.  
  124. MADTAG_CODE             equ     (MADTAG_DUMMY+3)
  125. ;* the code to be called on exceptions. Should be assembly.
  126. ;* a0 is the struct ExceptionData *, a1 and a4 are pointers to the data
  127. ;* item, see below, a5 is the pointer to the code and a6 is the MMUBase.
  128. ;* d0-d1/a0-a1 and a4-a5 are scratch registers. The exception handler must
  129. ;* return with the Z flag set (i.e. an "equal" condition) and d0 cleared to
  130. ;* indicate that it handled the exception and no other handler should be
  131. ;* called. *
  132.  
  133. MADTAG_DATA             equ     (MADTAG_DUMMY+4)
  134. ;* data to be loaded for the exception handler, will be passed in a1
  135. ;* and a4 *
  136.  
  137. MADTAG_NAME             equ     (MADTAG_DUMMY+5)
  138. ;* a unique name for the handler. The library makes currently no use of
  139. ;* this name. *
  140.  
  141. MADTAG_PRI              equ     (MADTAG_DUMMY+6)
  142. ;* the priority of the handler. Higher priority handlers are called first.
  143. ;* Should be above 32 for "emergency stack swap in" handlers, between 32
  144. ;* and -32 for standard handlers and below -32 for debugging tools like the
  145. ;* Enforcer and similar. *
  146.  
  147.  
  148.  
  149. ;* AddMessageHook tags *
  150.  
  151. MADTAG_CATCHERPORT      equ     (MADTAG_DUMMY+$100)
  152. ;* the port to send the exception message to for message hook types. *
  153.  
  154.  
  155. ;* GetContextData tags *
  156.  
  157.  
  158. MGXTAG_DUMMY            equ     (TAG_USER+$03e00400)
  159.  
  160. MGXTAG_PAGESIZE         equ     (MGXTAG_DUMMY+0)
  161. ;* Identical to GetPageSize() (GET only) *
  162.  
  163. MGXTAG_REMAPSIZE        equ     (MGXTAG_DUMMY+1)
  164. ;* Identical to RemapSize() (GET only) *
  165.  
  166. MGXTAG_ROOT             equ     (MGXTAG_DUMMY+2)
  167. ;* Address of the MMU tree root. You usually do not need it (GET only). *
  168.  
  169. MGXTAG_CONFIG           equ     (MGXTAG_DUMMY+3)
  170. ;* Return a pointer to struct MMUConfig (GET only). *
  171.  
  172. MGXTAG_USERDATA         equ     (MGXTAG_DUMMY+$100)
  173. ;* Return the user data (GET and SET). *
  174.  
  175. MGXTAG_ADDRESSSPACE     equ     (MGXTAG_DUMMY+$101)
  176. ;* Return the address space. Reserved for the memory lib (GET and SET). *
  177.  
  178.  
  179.         ENDC    ; MMU_MMUTAGS_I
  180.  
  181.